Skip to content

refactor(settings): move the four remaining setting readers onto the catalog - #205

Merged
fog-workflows[bot] merged 1 commit into
masterfrom
feat/settings-agent-readers
Nov 17, 2026
Merged

fog-workflows[bot] merged 1 commit into
masterfrom
feat/settings-agent-readers

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Closes #201. Part of the FOG 1.6 parity map (#155). Follows #198 (catalog) and #199 (FOG Configuration page).

What

  • Four new catalog entries in config/fog-settings.js: FOG_HOST_IDENTIFY_SMBIOS (select), FOG_AGENT_ENROLL_DEPLOY_WINDOW (number), FOG_CLIENT_CHECKIN_TIME (number), FOG_ENABLE_SHOW_PASSWORDS (checkbox).
  • resolve-host.js, auto-approve.js, poll.js and form-generator.js read through sails.helpers.settings.get. DEFAULT_WINDOW_HOURS, DEFAULT_POLL_INTERVAL and settingOn are gone; the catalog holds those rules now.
  • The FOG Configuration page renders number and checkbox controls, disabled without setting.update.

No decision changes

Each normalize + default copies the old reader's rule. test/helpers/settings-catalog.test.js feeds 18 stored values to the old rule (kept as a fixture) and to the catalog path for each key, compared with deepStrictEqual. The existing agent tests pass unchanged.

Guard

An empty or non-numeric number field sends no save and shows "Enter a number.". Number('') is 0, so a cleared deploy-window field would otherwise turn off deploy auto-approval in one edit. The server rule is unchanged.

Review

Implementation: sonnet. Spec and standards review: both on opus (critical tier: agent identity and auto-approval paths). Round 1: spec CLEAN, standards 2 findings (fixed). Round 2: both CLEAN.

Test

npm test (538 passing), npm run test:ui, npm run test:ui:prod.

🤖 Generated with Claude Code

…catalog

FOG_HOST_IDENTIFY_SMBIOS, FOG_AGENT_ENROLL_DEPLOY_WINDOW,
FOG_CLIENT_CHECKIN_TIME and FOG_ENABLE_SHOW_PASSWORDS now come from
config/fog-settings.js through sails.helpers.settings.get, so the FOG
Configuration page shows and validates every runtime setting fog-node reads.

Each normalize and default copies the old reader's rule, so no agent
identity, enrollment auto-approval, poll interval or password-reveal
decision changes. A table-driven test feeds 18 stored values (no row,
'', null, {}, booleans, numbers, strings) to the old rule and to the
catalog path for each key and requires the same result.

The page gains number and checkbox controls. A number field that is empty
or not a number sends nothing and shows "Enter a number.": Number('') is
0, so a cleared deploy-window field would otherwise switch off deploy
auto-approval in one edit. The descriptions say what fog-node does where
the 1.6 text is false for it.

Closes #201

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fog-workflows
fog-workflows Bot enabled auto-merge November 17, 2026 14:28
@fog-workflows
fog-workflows Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into master with commit a3acc15 Nov 17, 2026
6 checks passed
@fog-workflows
fog-workflows Bot deleted the feat/settings-agent-readers branch November 17, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the four remaining setting readers onto the settings catalog

1 participant